<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>System zapisów</title>
<script type="text/javascript" src="_scripts/jquery.js"></script>
<script type="text/javascript" src="_scripts/code.js"></script>
<link rel="stylesheet" href="_gfx/_table.css" type="text/css" />
</head>
<body>

    <table class="schedule">
        <tr>
            <th></th>
            {foreach from=$days item=day}
            <th colspan="2">{$day}</th>
            {/foreach}
        </tr>
    {section name=rows start=0 loop=60}
    <tr>
        {if $smarty.section.rows.index % 4 == 0}
        <td rowspan="4" class="clock">{$smarty.section.rows.index/4+7} - {$smarty.section.rows.index/4+8}
        </td>
        {/if}
        {section name=cols start=0 loop=7}

            {section name=week start=1 loop=3}
                {if $results[$smarty.section.cols.index][$smarty.section.rows.index][$smarty.section.week.index]}
                {assign var=tmp value=$results[$smarty.section.cols.index][$smarty.section.rows.index][$smarty.section.week.index]}
                    {if $tmp != 1 && $tmp != 2}
                            <td rowspan="{$tmp[2]}" class="subject" style="background: {$tmp[3]}" {if $tmp[1] == 0} colspan="2"{/if}>
                                <strong>{$tmp[0]}</strong><br />
                                <em>{$tmp[4]} (s {$tmp[5]})</em>
                            </td>
                    {elseif $tmp == 2}
                    {/if}
                {else}
                    <td class="empty{$smarty.section.week.index} {if $smarty.section.rows.index % 4 == 0}clock{/if}"></td>
                {/if}
            {/section}
            
        
        {/section}
    </tr>
    {/section}

    </table>
</body>
</html>
